.class public Lorg/zeam/UserFolder;
.super Lorg/zeam/Folder;
.source "UserFolder.java"

# interfaces
.implements Lorg/zeam/DropTarget;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 13
    invoke-direct {p0, p1, p2}, Lorg/zeam/Folder;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 14
    return-void
.end method

.method static fromXml(Landroid/content/Context;)Lorg/zeam/UserFolder;
    .locals 3
    .parameter "context"

    .prologue
    .line 17
    invoke-static {p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f030016

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Lorg/zeam/UserFolder;

    return-object p0
.end method


# virtual methods
.method public acceptDrop(Lorg/zeam/DragSource;IIIILjava/lang/Object;)Z
    .locals 8
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    const/4 v7, 0x1

    .line 22
    move-object v0, p6

    check-cast v0, Lorg/zeam/ItemInfo;

    move-object v1, v0

    .line 23
    .local v1, item:Lorg/zeam/ItemInfo;
    iget v2, v1, Lorg/zeam/ItemInfo;->itemType:I

    .line 24
    .local v2, itemType:I
    if-eqz v2, :cond_0

    .line 25
    if-ne v2, v7, :cond_1

    :cond_0
    iget-wide v3, v1, Lorg/zeam/ItemInfo;->container:J

    iget-object v5, p0, Lorg/zeam/UserFolder;->mInfo:Lorg/zeam/FolderInfo;

    iget-wide v5, v5, Lorg/zeam/FolderInfo;->id:J

    cmp-long v3, v3, v5

    if-eqz v3, :cond_1

    move v3, v7

    :goto_0
    return v3

    :cond_1
    const/4 v3, 0x0

    .line 24
    goto :goto_0
.end method

.method bind(Lorg/zeam/FolderInfo;)V
    .locals 3
    .parameter "info"

    .prologue
    .line 62
    invoke-super {p0, p1}, Lorg/zeam/Folder;->bind(Lorg/zeam/FolderInfo;)V

    .line 63
    new-instance v0, Lorg/zeam/ApplicationsAdapter;

    invoke-virtual {p0}, Lorg/zeam/UserFolder;->getContext()Landroid/content/Context;

    move-result-object v1

    check-cast p1, Lorg/zeam/UserFolderInfo;

    .end local p1
    iget-object v2, p1, Lorg/zeam/UserFolderInfo;->contents:Ljava/util/ArrayList;

    invoke-direct {v0, v1, v2}, Lorg/zeam/ApplicationsAdapter;-><init>(Landroid/content/Context;Ljava/util/ArrayList;)V

    invoke-virtual {p0, v0}, Lorg/zeam/UserFolder;->setContentAdapter(Landroid/widget/BaseAdapter;)V

    .line 64
    return-void
.end method

.method public estimateDropLocation(Lorg/zeam/DragSource;IIIILjava/lang/Object;Landroid/graphics/Rect;)Landroid/graphics/Rect;
    .locals 1
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"
    .parameter "recycle"

    .prologue
    .line 29
    const/4 v0, 0x0

    return-object v0
.end method

.method public onDragEnter(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 0
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 41
    return-void
.end method

.method public onDragExit(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 0
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 47
    return-void
.end method

.method public onDragOver(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 0
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 44
    return-void
.end method

.method public onDrop(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 8
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    const/4 v5, 0x0

    .line 34
    move-object v0, p6

    check-cast v0, Lorg/zeam/ApplicationItemInfo;

    move-object v2, v0

    .line 36
    .local v2, item:Lorg/zeam/ApplicationItemInfo;
    iget-object v1, p0, Lorg/zeam/UserFolder;->mContent:Landroid/widget/AbsListView;

    invoke-virtual {v1}, Landroid/widget/AbsListView;->getAdapter()Landroid/widget/Adapter;

    move-result-object v1

    check-cast v1, Landroid/widget/ArrayAdapter;

    check-cast p6, Lorg/zeam/ApplicationItemInfo;

    .end local p6
    invoke-virtual {v1, p6}, Landroid/widget/ArrayAdapter;->add(Ljava/lang/Object;)V

    .line 37
    iget-object v1, p0, Lorg/zeam/UserFolder;->mLauncher:Lorg/zeam/Launcher;

    iget-object v3, p0, Lorg/zeam/UserFolder;->mInfo:Lorg/zeam/FolderInfo;

    iget-wide v3, v3, Lorg/zeam/FolderInfo;->id:J

    move v6, v5

    move v7, v5

    invoke-static/range {v1 .. v7}, Lorg/zeam/LauncherModel;->addOrMoveItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIII)V

    .line 38
    return-void
.end method

.method public onDropCompleted(Landroid/view/View;Z)V
    .locals 2
    .parameter "target"
    .parameter "success"

    .prologue
    .line 52
    if-eqz p2, :cond_0

    .line 55
    iget-object v1, p0, Lorg/zeam/UserFolder;->mContent:Landroid/widget/AbsListView;

    invoke-virtual {v1}, Landroid/widget/AbsListView;->getAdapter()Landroid/widget/Adapter;

    move-result-object v0

    check-cast v0, Landroid/widget/ArrayAdapter;

    .line 57
    .local v0, arrayAdapter:Landroid/widget/ArrayAdapter;,"Landroid/widget/ArrayAdapter<Lorg/zeam/ApplicationItemInfo;>;"
    iget-object v1, p0, Lorg/zeam/UserFolder;->mDragItem:Lorg/zeam/ApplicationItemInfo;

    invoke-virtual {v0, v1}, Landroid/widget/ArrayAdapter;->remove(Ljava/lang/Object;)V

    .line 59
    .end local v0           #arrayAdapter:Landroid/widget/ArrayAdapter;,"Landroid/widget/ArrayAdapter<Lorg/zeam/ApplicationItemInfo;>;"
    :cond_0
    return-void
.end method

.method onOpen()V
    .locals 0

    .prologue
    .line 68
    invoke-super {p0}, Lorg/zeam/Folder;->onOpen()V

    .line 69
    invoke-virtual {p0}, Lorg/zeam/UserFolder;->requestFocus()Z

    .line 70
    return-void
.end method
